#ifndef __NJGIS_INJKNOWN_H__
#define __NJGIS_INJKNOWN_H__

namespace NJGIS
{
	class INxUnknown
	{
	public:
		INxUnknown(): mReferenceCounter(1)
		{
            
		}

		virtual ~INxUnknown(){};

		virtual int addRef()
		{
			return ++mReferenceCounter;
		}

		virtual int release()
		{
			mReferenceCounter--;
			if(!mReferenceCounter){
				delete this;return 0;
			}
			else{
				return mReferenceCounter;
			}
		}
		virtual int getReferenceCounter(){return mReferenceCounter;}

	protected:
		int mReferenceCounter;
	};
}

#endif